package com.ktjiaoyu.crm.controller;

import com.alibaba.druid.support.json.JSONUtils;
import com.alibaba.fastjson.JSON;
import com.ktjiaoyu.crm.pojo.User;
import com.ktjiaoyu.crm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName : UserController
 * @Description :
 * @Author : Lzz
 * @Date: 2023/11/15 11:34:51
 */
@Controller
public class UserController {

    @Autowired
    private UserService userService;


    @RequestMapping("/hello")
    @ResponseBody
    public String getUserById(){
        User user = userService.getById(1);
        return JSON.toJSONString(user);
    }

}
